package cn.appsys.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.appsys.pojo.AppInfo;
import cn.appsys.service.backend_applist.BackEnd_ListService;

@Controller
public class AppCheckController {
	private Logger log = Logger.getLogger(LoginController.class);
	@Resource(name = "backEnd_ListService")
	public BackEnd_ListService backEnd_ListService;
	@RequestMapping("/list")
	public String getList(){
		return "redirect:applist";
	}
	@RequestMapping("/applist")
	public String getAppList(HttpServletRequest request,
			AppInfo appInfo){
		System.out.println("====================getAppList====================");
		String softwareName = request.getParameter("querySoftwareName");
		appInfo.setSoftwareName(softwareName);
		List<AppInfo> appInfoList = backEnd_ListService.getAppList(appInfo);
		if(null != appInfo){
			request.setAttribute("appInfoList", appInfoList);
		}
			return "backend/applist";
	}
}
